// ResourceService.js
import axios from 'axios';

const ResourceService = {
  uploadFile(file, taskName) {
    const formData = new FormData();
    formData.append('file', file);
    formData.append('taskName', taskName);

    return axios.post('http://localhost:8080/api/resources/upload', formData, {
      headers: {
        'Content-Type': 'multipart/form-data',
      },
    });
  },
};

export default ResourceService;